package org.wzl.todolisthelper.config;

import jakarta.annotation.Resource;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.wzl.todolisthelper.config.interceptor.TraceIdInterceptor;

@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    @Resource
    private TraceIdInterceptor traceIdInterceptor;
 
    /**
     * http请求拦截器
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
 
        registry.addInterceptor(traceIdInterceptor);
    }
}